package com.wanxi.array;

public class PrintArray {
    //        [11,22,33]以后经常打印数组是这种形式
    public static void main(String[] args) {
        int[] arr = {11, 22, 33};
//        System.out.println("请输入一个字符"+3+"aaa");
        String str = "[";
        for (int i = 0; i < arr.length; i++) {
            str += arr[i];
//            str = str + arr[i];
            if (i == arr.length - 1) {

            } else {
                str += ",";
            }
        }
        str += "]";
        System.out.println(str);
    }
}
